<form action="{:url('authentication')}" method="post" class="form-horizontal ajax-form form-authentication">
	<input type="hidden" name="id" class="form-control" value="{$data['id']}" />
	<input type="hidden" name="uid" class="form-control" value="{$data['uid']}" />
	<div class="form-body">

		<div class="form-group">
			<label class="col-sm-2 control-label">姓名</label>
			<div class="form-controls col-sm-8">
				<div class="text">{$data['name']}</div>
			</div>
		</div>

        <div class="form-group">
			<label class="col-sm-2 control-label">证件号码</label>
			<div class="form-controls col-sm-8">
				<div class="text">{$data['card_no']}</div>
			</div>
		</div>

        <div class="form-group">
			<label class="col-sm-2 control-label">证件图片</label>
			<div class="form-controls col-sm-8">
				<div class="text">
                    <a class="preview" href="{$data['front_original']}" target="_blank">正面</a>
                    <a class="preview" href="{$data['back_original']}" target="_blank">反面</a>
                </div>
			</div>
		</div>

		<div class="form-group status-section">
			<label class="col-sm-2 control-label">审核状态</label>
			<div class="form-controls col-sm-8">
				{if $data['status'] == 1}
				<input type="radio" name="status" id="is_status-1" value="1" checked> 
				<label class="radio-inline" for="is_status-1">待审核</label>
				<input type="radio" name="status" id="is_status-2" value="2">
				<label class="radio-inline" for="is_status-2"> 通过审核</label>
                <input type="radio" name="status" id="is_status--1" value="-1">
				<label class="radio-inline" for="is_status--1"> 审核未通过</label>
				{/if}
				{if $data['status'] == 2}
				<input type="radio" name="status" id="is_status-1" value="1"> 
				<label class="radio-inline" for="is_status-1">待审核</label>
				<input type="radio" name="status" id="is_status-2" value="2">
				<label class="radio-inline" for="is_status-2"> 通过审核</label checked>
                <input type="radio" name="status" id="is_status--1" value="-1">
				<label class="radio-inline" for="is_status--1"> 审核未通过</label>
				{/if}
				{if $data['status'] == -1}
				<input type="radio" name="status" id="is_status-1" value="1"> 
				<label class="radio-inline" for="is_status-1">待审核</label>
				<input type="radio" name="status" id="is_status-2" value="2">
				<label class="radio-inline" for="is_status-2"> 通过审核</label>
                <input type="radio" name="status" id="is_status--1" value="-1" checked>
				<label class="radio-inline" for="is_status--1"> 审核未通过</label>
				{/if}
			</div>
		</div>

        <div class="{if $data['status'] == -1}form-group{else}form-group hidden{/if}" id="statusReason">
            <label class="col-sm-2 control-label">未通过原因</label>
            <div class="form-controls col-sm-8">
                <textarea class="form-control" rows="3" name="reason" placeholder="请填写未通过审核原因">{$data['reason']}</textarea>
                <div class="help-block">请填写未通过审核原因</div>
            </div>
        </div>
        <script>
            $(function(){
                $(".status-section input[type='radio']").on("click",function () {
                    if($("input[id='is_status--1']:checked").val()=="-1"){
                        $('#statusReason').removeClass('hidden');
                    }else{
                        $('#statusReason').addClass('hidden');
                    }
                })
            })
        </script>

		<div class="form-group">
			<label class="col-sm-2 control-label"></label>
			<div class="form-controls col-sm-8">
				<input type="submit" name="submit" value="确认提交" class="btn btn-primary" />
			</div>
		</div>
	</div>
</form>

